package org.dut.mybatis.Service;

import org.dut.mybatis.Mapper.UserInfoMapper;
import org.dut.mybatis.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserInfoMapper userInfoMapper;

    public List<UserInfo> queryUserByPassword(String username, String password) {
        UserInfo userInfo = new UserInfo();
        userInfo.setPassword(password);
        userInfo.setUsername(username);
        return userInfoMapper.selectByPassword(userInfo);
    }
}
